package com.azthink.aopdemo.controller;


import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Calendar;

@RestController
@RequestMapping(value = "/api/hello")
public class HelloController {

    //http://localhost:8088/api/hello/say?name=aop
    @RequestMapping(value = "/say")
    public String say(@RequestParam String name){

        System.out.println("HelloController say: Hello, " + name);
        return "Hello, " + name;
    }
    //http://localhost:8088/api/hello/say?name=aop
    @RequestMapping(value = "/aa")
    public String aa(@RequestParam String name){

        System.out.println("HelloController aa: Hello, " + name);
        return "Hello, " + name;
    }
    //http://localhost:8088/api/hello/say?name=aop
    @RequestMapping(value = "/bb")
    public String bb(@RequestParam String name){

        System.out.println("HelloController bb: Hello, " + name);
        return "Hello, " + name;
    }
    //http://localhost:8088/api/hello/say?name=aop
    @RequestMapping(value = "/cc")
    public String cc(@RequestParam String name){
        //执行业务代码
        System.out.println("HelloController cc: Hello, " + name);
        return "Hello, " + name;
    }


}
